import { createRouter, createWebHistory } from 'vue-router';
import HomePage from '@/page/HomePage.vue'
import ManagePage from "@/page/ManagePage.vue";
import MarketPage from "@/page/MarketPage.vue";
import UserManage from "@/components/UserManage.vue";
import InterfaceManage from "@/components/InterfaceManage.vue";


const routes = [
    {
        path: '/home',
        name: 'Home',
        component: HomePage
    },
    {
        path: '/manage',
        name: 'Manage',
        component: ManagePage,
        children: [
            {
                path: '/manage/user',
                name: 'User',
                component: UserManage
            },
            {
                path: '/manage/interfaceInfo',
                name: 'Interface',
                component: InterfaceManage
            }

        ]
    },
    {
        path: '/market',
        name: 'Market',
        component: MarketPage
    },
    { path: '', redirect: '/home'},

]
export default createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes
})